With the mode specifiers above the file is open as a text file. In order to open a file as a binary file, a b character has to be included in the mode string.
I created a File of 4000 blocks with a blocksize of 4096 Bytes. Now I want to manipulate single blocks and read them again without changeing the files' size.
The b flag opens the file in binary mode, which disables the special handling of certain characters in DOS and Windows, but has no effect on macOS and POSIX ...